package com.d3works.apps.production.service.configurator;

import com.d3works.apps.base.db.Product;
import com.d3works.apps.production.db.BillOfMaterial;
import com.d3works.apps.production.db.ConfiguratorBOM;
import com.d3works.exception.D3worksException;
import com.d3works.rpc.JsonContext;
import java.util.Optional;

public interface ConfiguratorBomService {

  /**
   * Generate a bill of materials from a configurator BOM and a JsonContext holding the custom
   * values
   *
   * @param configuratorBOM
   * @param attributes
   * @param level
   * @param generatedProduct
   * @return
   */
  Optional<BillOfMaterial> generateBillOfMaterial(
      ConfiguratorBOM configuratorBOM, JsonContext attributes, int level, Product generatedProduct)
      throws D3worksException;
}
